<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <!-- 装饰器内容勿动 start -->
    <title>阴保运行管理-异常处理单</title>
    <!-- 装饰器内容勿动 start -->
    <style>
        .none{display:none !important;}
    </style>
</head>
<body>
<div class="main-inner">
    <div class="content-inner">
       <div class="conter">
            <div class="meta-head">
                <h3><i class="zy-qushi-icon"></i>异常处理单</h3>
            </div>
            <div class="lsk-info">
                <ul>
                    <li class="lsk-w40"><span class="lsk-name">管道名称:</span><span class="lsk-name-key" id="pipeLineName">${exceptionInfo.pipeLineName}</span></li>
                    <li class="lsk-w60"><span class="lsk-name">所属场站阀室:</span><span class="lsk-name-key">${exceptionInfo.pipeValveroomName}</span></li>
                    <li class="lsk-w40"><span class="lsk-name">处理状态:</span><span class="lsk-name-key">${exceptionInfo.stated}</span></li>
                    <li class="lsk-w60"><span class="lsk-name">记录时间:</span>
                        <span class="lsk-name-key"><fmt:formatDate value="${exceptionInfo.recordTime}"  type="date" /></span></li>
                    <li class="lsk-w100"><span class="lsk-name">异常情况:</span><span>${exceptionInfo.description}</span></li>
                    <li class="lsk-w100"><span class="lsk-name">备注:</span><span class="lsk-name-key">${exceptionInfo.remarks}</span></li>
                    <input type="hidden" id="sbnx" value="${exceptionInfo.eqptType_label}">
                    <input type="hidden" id="sbbh" value="${exceptionInfo.eqptNumber}">
                    <input type="hidden" id="pname" value="${exceptionInfo.pipeLineName}">
                </ul>
            </div>
            <p class="lsk-title">现场照片</p>
            <div class="lsk-photo" id="">

            </div>
            <div class="lsk-map-advice">
                <div class="left-map">
                    <p class="lsk-title">位置</p>
                    <div>
                        <iframe id="JQ_dyMap" src="${gisResourcePath}/baseMapLoction.jsp?lng=${exceptionInfo.lng}&lat= ${exceptionInfo.lat}" frameborder="0">

                        </iframe>
                    </div>
                </div>
                <div class="right-advice">
                    <p class="lsk-title">处理意见</p>
                    <div>
                        <textarea id="clyj">${exceptionInfo.treatOpinion}</textarea>
                    </div>
                </div>
            </div>
            <div class="lsk-on-off">
                <em></em>
                <span>已处置</span>
                <c:if test="${empty exceptionInfo.stated or exceptionInfo.stated == '未处理'}">
                    <i class="off-on" data_value="UNTREATED" ></i>
                </c:if>
                <c:if test="${exceptionInfo.stated == '已处理'}">
                    <i class="off-on active" data_value="PROCESSED"></i>
                </c:if>
                <input type="hidden" data-value="${exceptionInfo.stated}" id="onSet">

            </div>
            <p class="lsk-title">处理记录</p>
            <div class="lsk-Processing-record">
                <textarea id="czjl">${exceptionInfo.treatRecord}</textarea>
            </div>
       </div>
        <div class="zy-form-line lsk-m20" style="text-align: right">
            <button type="button" onclick="javascript:history.back(-1);" class="zy-button zy-goback lsk-right15" id="JQ_create_goback_01"><i class="zy-goback-icon" ></i>返回</button>
            <button type="button" class="zy-button zy-submit lsk-right15" id="JQ_submit_01"><i class="zy-submit-icon"></i>确认</button>
            <button type="button" class="zy-button zy-export exportPdf " id="JQ_export_btn_01"><i class="zy-export-icon"></i>导出</button>
            <div class="clear"></div>
        </div>
    </div>

    <input type="hidden" class="exception_id" id="${exceptionId}"/>
</div>
<!-- 你的内容 end -->
<script>
//    $('#JQ_export_btn_01').click(function(){
//        var $ifr_dyMap = $('#JQ_dyMap');
//        var $ifr_body = $($ifr_dyMap[0].contentWindow.document.getElementById('container'));
//        /*
//        var html1_1 = $ifr_body.html();
//        var _svg_html = html1_1.substring(html1_1.indexOf("<svg"));
//        //console.log(_svg_html);
//        var $t_canvas = $('<canvas id="t_canvas"></canvas>');
//        $('#t_canvas_div').append($t_canvas);
//        canvg("t_canvas",_svg_html);
//        var _svg = $ifr_dyMap[0].contentWindow.document.getElementById('mask_gc');
//        $(_svg).remove();//删掉svg
//        $ifr_body.append($t_canvas);//画布填充到iframe
//        $('#t_canvas_div').empty();//*/
//        html2canvas($ifr_body, {
//            proxy: DyyBase.root_path+ '/comm/downNetFile.json',
//            onrendered: function (canvas) {
//                var url = canvas.toDataURL();
//                //$("#imgaaa").attr('src', url);
//                var $img = $('<img style="width: 100%; height: 100%">').attr('src', url);
//                $ifr_dyMap.after($img).hide();//appendTo($('#t_canvas_div'))
//                /**/
//                html2canvas($('.conter')).then(function(canvas) {
//                    $ifr_dyMap.show();
//                    //$img.before($ifr_dyMap);
//                    $img.remove();
//
//                    var url = canvas.toDataURL();
//                    //$img = $img.attr('src', url);
//
//                    //$ifr_body.find('#t_canvas').remove();//删除画布
//                    //$ifr_body.append(_svg);//重新显示svg
//                    var param = [{name:'name',value:'异常管理_异常处理单'},{name:'imgs',value: url}];
//                    s_downFile(DyyBase.root_path+ '/comm/downImgPdf.json',param);
//
//                });
//            }
//        });
//    });
</script>

<!-- 大图展示 -->
<div id="JQ_img_div"></div>
<!-- JS start -->
<!-- ui -->
<script src="${pageContext.request.contextPath}/static/js/ui/ui-main.js"></script>
<script src="${resourcePath}/js/canvg.js"></script>
<script src="${resourcePath}/js/html2canvas.js"></script>
<!-- base -->
<script src="${pageContext.request.contextPath}/static/js/controller/base/base.controller.js"></script>
<!-- api -->
<script src="${pageContext.request.contextPath}/static/js/controller/api/corrctrl.api.js"></script>
<!-- controller -->
<script src="${pageContext.request.contextPath}/static/js/controller/corrctrl/cathodic/exceptionHandling.controller.js"></script>

</body>
</html>